<div id="content">
    <div class="row s_page_title">
        <sa-big-breadcrumbs [items]="['系统配置','APP版本配置']" icon="fa fa-cog" class="col-xs-12 col-sm-7 col-md-7 col-lg-4"></sa-big-breadcrumbs>
    </div>
    <sa-widgets-grid>
        <div class="s_table">
            <div sa-widget [editbutton]="false" color="darken" class="clearfix">
                <header><span class="widget-icon"> <i class="fa fa-table"></i> </span>
                    <h2>APP版本配置</h2>
                </header>
                <div>
                    <div class="widget-body no-padding">
                        <div class="page-header clearfix s_table_opreation">
                            <div class="left page-header-btn">
								<!-- <sa-company-tree-car companyTreeId="companyTree" wrapId="content" [isShowCarSort]="false" [isShowCarNum]="false" (companySelected)="companySelected($event)"></sa-company-tree-car> -->
								<div class="top_module top_module_box">
									<span class="top_module_label module_text">app类型</span>
									<select name="" class="top_module_select" [(ngModel)]="type">
										<option value="">全部</option>
										<option value="1">安卓</option>
										<option value="2">IOS</option>
									</select>
								</div>
								<div class="top_module top_module_box">
									<span class="top_module_label module_text">是否需要提示更新</span>
									<select name="" class="top_module_select" [(ngModel)]="isTips">
										<option value="">全部</option>
										<option value="0">不需要</option>
										<option value="1">需要</option>
									</select>
                                </div>
                                <div class="top_module top_module_box">
									<span class="top_module_label module_text">是否强制更新</span>
									<select name="" class="top_module_select" [(ngModel)]="isForce">
										<option value="">全部</option>
										<option value="0">不需要</option>
										<option value="1">需要</option>
									</select>
								</div>
                                <button type="button" class="btn btn-primary" (click)="tableSearch()">查询</button>
                                <button type="button" class="btn btn-primary" (click)="showAddLimitModal(appVersionDeployModal)">添加</button>
                                <!-- <button type="button" class="btn btn-primary" (click)="showImportModal(weightModal)">批量导入</button> -->
                                <!-- <button type="button" class="btn btn-primary" (click)="exportData()">导出</button> -->
                            </div>
                            <div class="right top-search">
								<input type="text" [(ngModel)]="searchKey" (change)="tableSearch()" class="search-input" placeholder="版本号 更新内容">
								<span class="top-search-box">
									<button class="top-search-btn" type="button" (click)="tableSearch()"> <i class="fa fa-search"></i></button>
								</span>
							</div>
                        </div>
                        <div class="table_scroll">
                            <table class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
                                <thead>
                                    <tr>
                                        <th>app名称</th>
                                        <th>app类型</th>
                                        <th>app版本</th>
                                        <th>更新内容</th>
                                        <th>是否需要提示更新</th>
                                        <th>是否强制更新</th>
                                        <th *ngIf="isShowDelete">操作</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr *ngFor="let row of tableData" [ngClass]='{selected: activeSelected === row.id }'>
                                        <td>{{row.appName}}</td>
                                        <td>{{row.type=='1'?'安卓':"IOS"}}</td>
                                        <td>{{row.version}}</td>
                                        <td>{{row.content}}</td>
                                        <td>{{row.isTips?'需要':"不需要"}}</td>
                                        <td>{{row.isForce?'需要':"不需要"}}</td>
                                        <!-- 这里也根据权限 -->
                                        <td *ngIf="isShowDelete">
                                            <!-- <button type="button" (click)="editRow(row,appVersionDeployModal)">编辑</button> -->
                                            <button type="button" (click)="del_domCode(row)">删除</button>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                        <div class="table-fix clearfix">
                            <paginator [totalRecords]="totalCounts" [rows]="pageSize" [currentPage]="curPage - 1" (onPageChange)="paginate($event)">
                            </paginator>
                            <button type="button" class="btn default refresh_btn" (click)="refresh()"><i class="fa fa-refresh"></i></button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </sa-widgets-grid>
</div>

<!-- 新增项目管理 -->
<section bsModal #appVersionDeployModal="bs-modal" class="modal fade addRenewal" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content" style="width: 670px;">
            <div class="modal-header">
                <button type="button" class="close" (click)="closeappVersionDeployModal(appVersionDeployModal)" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">{{formType=="add"?'新增':'编辑'}}配置</h4>
            </div>
            <div class="modal-body">
                <form id="appVersionDeploy" class="form-horizontal" role="form" novalidate="novalidate" [saBootstrapValidator]="validatorOptions">
                    <div class="row form-horizontal">
                        <div class="form-group clearfix">
                            <label class="control-label col-sm-3 no-padding-right">app名称<sup>*</sup></label>
                            <div class="col-sm-9">
                                <div class="clearfix">
                                    <input class="form-control" name="appName" autocomplete="off" type="text" [(ngModel)]='appVersionDeployObj.appName'  placeholder="填写app名称" />
                                </div>
                            </div>
                        </div>
                        <div class="form-group clearfix">
                            <label class="control-label col-sm-3 no-padding-right">app类型<sup>*</sup></label>
                            <div class="col-sm-9">
                                <div class="clearfix">
                                    <label class="col-sm-4"><input type="radio" class="radioSales" name="type" value="1" (click)="clickCheck(1)" style="margin-right: 10px" [checked]="isCheck" />安卓</label>
									<label class="col-sm-4"><input type="radio" class="radioSales" name="type" value="2" (click)="clickCheck(2)" style="margin-right:10px" [checked]="!isCheck" />IOS</label>
                                </div>
                            </div>
                        </div>
                        <div class="form-group clearfix">
                            <label class="control-label col-sm-3 no-padding-right">app版本<sup>*</sup></label>
                            <div class="col-sm-9">
                                <div class="clearfix">
                                    <input class="form-control" name="version" autocomplete="off" type="text" [(ngModel)]='appVersionDeployObj.version' placeholder="填写app版本" />
                                </div>
                            </div>
                        </div>
                        <div class="form-group clearfix">
                            <label class="control-label col-sm-3 no-padding-right">更新内容<sup>*</sup></label>
                            <div class="col-sm-9">
                                <div class="clearfix">
                                    <textarea class="form-control" type="text"  [(ngModel)]='appVersionDeployObj.content' name='content' placeholder='填写更新内容'></textarea>
                                </div>
                            </div>
                        </div>
                        <div class="form-group clearfix">
                            <label class="control-label col-sm-3 no-padding-right">是否需要提示更新<sup>*</sup></label>
                            <div class="col-sm-9">
                                <div class="clearfix">
                                    <label class="col-sm-4"><input type="radio" class="radioSales" name="isTips" value="1" (click)="clickisTips(1)" style="margin-right: 10px" [checked]="isCheckTips" />需要</label>
									<label class="col-sm-4"><input type="radio" class="radioSales" name="isTips" value="0" (click)="clickisTips(0)" style="margin-right:10px" [checked]="!isCheckTips" />不需要</label>
                                </div>
                            </div>
                        </div>
                        <div class="form-group clearfix">
                            <label class="control-label col-sm-3 no-padding-right">是否强制更新<sup>*</sup></label>
                            <div class="col-sm-9">
                                <div class="clearfix">
                                    <label class="col-sm-4"><input type="radio" class="radioSales" name="isForce" value="1" (click)="clickForce(1)" style="margin-right: 10px" [checked]="isCheckForce" />需要</label>
									<label class="col-sm-4"><input type="radio" class="radioSales" name="isForce" value="0" (click)="clickForce(0)" style="margin-right:10px" [checked]="!isCheckForce" />不需要</label>
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" (click)="closeappVersionDeployModal(appVersionDeployModal)">取消</button>
                <button type="button" class="btn btn-primary" (click)="submitModal(appVersionDeployModal)">提交</button>
            </div>
        </div>
    </div>
</section>
<!-- 新增项目管理 结束 -->